<?php get_header(); ?>
                <!--- CONTENT --->

<script type="text/javascript">

jQuery(document).ready(function() {
    jQuery('#carousel').jcarousel(function(){
        wrap: 'circular'   
    });  
});

</script>
        <!--- BOTTOM-CONTENT --->

        <div id="bottom-content" class="shadow">
            <span class="title blog">Blog</span>
            <span class="title calendario">Calendário</span>            
                                        
            <div id="container" class="grid-12">
                        
                    <!--- LIST-POSTS --->                         
            <div class=" alpha grid-8 " style="height: 1350px"> 
                <?php 
                    $proj = get_cat_ID($cat_name="projeto");
                    $pesq = get_cat_ID($cat_name="pesquisa");
                    $ensi = get_cat_ID($cat_name="ensino");
                    $exte = get_cat_ID($cat_name="extensao");
                    $prod = get_cat_ID($cat_name="producao");                
                ?>
                
                
                <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
                <?php query_posts("cat=-$proj,-$pesq,-$ensi,-$exte,-$prod&paged=$paged"); ?>
		<?php if ( have_posts() ) : ?>             
                  
                    <?php rewind_posts(); ?>
        	    <?php /* Start the Loop */ ?>
		    <?php while ( have_posts() ) : the_post(); ?>

                        <div class="post">
                            <h1><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
                            <div class="info">
                                Por <?php the_author_posts_link(); ?> em <?php the_date(); ?> 
                                | <?php comments_number( '0 Comentário', '1 Comentário', '% Comentários' ); ?> 

                                <div class="info-categorias" style="margin-top: 0px;">                                        
                                    <?php the_category('&nbsp;');?>    
                                </div>  
                            </div>

                            <p>
                                <?php if(function_exists('the_excerpt_rereloaded')): 
                                        the_excerpt_rereloaded(40,'Continue Lendo &#187;'); 
                                      else:
                                        the_excerpt();
                                      endif;
                                ?>
                            </p>
                            
                            <div class="infobarra">
                                    <span class="twitter">
                                        <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a>
                                        <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>                                            
                                    </span>

                                    <span class="plus">
                                        <g:plusone size="medium"></g:plusone>
                                    </span>

                                    <span class="facebook">
                                        <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:20px"></iframe>
                                    </span> 

                                <span class="info-coment">
                                    <?php if(function_exists('the_views')) { the_views(); } ?>
                                </span>
                            </div>                             
                            
                        </div>

       		   <?php endwhile; ?>

                   <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>

               <?php else : endif; ?>                                                  
                
              </div>
                          

             <!--- SIDEBAR --->                                         
            <div class="calendar grid-4 omega">
                <div class="widget size94">
                    <?php echo tribe_get_current_month_text(); ?>
                    <?php if(function_exists('tribe_calendar_mini_grid')) tribe_calendar_mini_grid(); ?>
                    <p>Calendário dos últimos eventos do CCNM</p>
                </div>
            </div>
             
              <?php get_sidebar(); ?>    
                   
            </div>
            <div class="clearfix"></div>  
        </div>

        <br /><br />
        <div id="top-content" class="shadow-top">         
            <div class="bottom-content-sup txt-center"></div>            
            
            <span class="title projetos" class="Projetos de Extensão">Projetos</span>

            <div id="container" class="grid-12 height45">
                <div class="alpha grid-8" style="height: 261px;"> 
                    <ul id="carousel" class="jcarousel-skin-tango">                    
                        <?php $projeto = new WP_Query('category_name=projeto&showposts=3&orderby=rand'); ?>
                        <?php if($projeto->have_posts()): ?>
                        <?php   while ($projeto->have_posts()): $projeto->the_post(); ?>
                        <li>
                        <div class="alpha destaque grid-5">
                            <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">                                 
                                <div class="thumb"> 
                                <?php
                                        if(function_exists('the_post_thumbnail'))
                                        the_post_thumbnail(array(150,150), array('title' => get_the_title())); 
                                ?>                                                                               
                                </div>                            
                                <div class="info-projeto">
                                    <h1>
                                        <?php the_title(); ?>
                                    </h1>
                                    <p>
                                        <?php if(function_exists('the_excerpt_rereloaded')): 
                                                the_excerpt_rereloaded(10,''); 
                                            else:
                                                the_excerpt();
                                            endif;
                                        ?>
                                    </p>                                
                                </div>                                
                            </a>                                  
                        </div>                    
                    </li>
                        <?php endwhile; endif; ?>                                                                 
                   </ul>                        
                </div>                        
                                 
                <div class="link-projetos">
                    <a href="?category_name=projeto">Ver Todos os Projetos &raquo;</a>
                </div>
                
                <div class="sidebar-bottom grid-4 omega">                                              
                   <?php the_login_box(); ?>    
                </div>                              
                
                <div class="cloud grid-11">
                    <div class="widget grid-11">
                        <div class="titulo tag-title">
                            <h3>Tags</h3>
                        </div>
                        <div class="widget-box tag-cloud">
                            <?php wp_tag_cloud('smallest=12&largest=18&number=30'); ?>
                        </div>                                
                    </div>                      
                </div>     
            </div>
        </div>        
        
        
   </div>
</div>

<?php get_footer(); ?>
